package com.literature.search.core.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/**
 * @ClassName CollectFileRelationship
 * @Description 用户收藏文档关系
 * @Author abin
 * @Date 2023/2/22 23:43
 * @Version 1.0
 */
@Data
@Document(collection = "collect_file_relationship")
public class CollectFileRelationship {
    @Id
    @ApiModelProperty(value = "id号")
    private String id;

    @Field("user_id")
    @ApiModelProperty(value = "用户ID")
    private String userId;

    @Field("file_id")
    @ApiModelProperty(value = "文件ID")
    private String fileId;

    @Field("state")
    @ApiModelProperty(value = "收藏状态")
    private Integer state;

    @Field("create_date")
    @ApiModelProperty(value = "收藏时间")
    private String createDate;

    public CollectFileRelationship(String fileId, String userId, Integer state, String createDate){
        this.fileId = fileId;
        this.userId = userId;
        this.state = state;
        this.createDate = createDate;
    }
}
